VERSION 5.00
Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form Form1 
   Caption         =   "Cryptocx v7 OpenPGP compatible related functions Demo program"
   ClientHeight    =   8460
   ClientLeft      =   1425
   ClientTop       =   2310
   ClientWidth     =   12645
   LinkTopic       =   "Form1"
   ScaleHeight     =   8460
   ScaleWidth      =   12645
   Begin TabDlg.SSTab SSTab2 
      Height          =   7140
      Left            =   135
      TabIndex        =   0
      Top             =   1185
      Width           =   12345
      _ExtentX        =   21775
      _ExtentY        =   12594
      _Version        =   393216
      Tabs            =   6
      TabsPerRow      =   6
      TabHeight       =   520
      TabCaption(0)   =   "Key Generation"
      TabPicture(0)   =   "Form1.frx":0000
      Tab(0).ControlEnabled=   -1  'True
      Tab(0).Control(0)=   "frmPGPKeyGen"
      Tab(0).Control(0).Enabled=   0   'False
      Tab(0).ControlCount=   1
      TabCaption(1)   =   "Key Management"
      TabPicture(1)   =   "Form1.frx":001C
      Tab(1).ControlEnabled=   0   'False
      Tab(1).Control(0)=   "SSTab4"
      Tab(1).ControlCount=   1
      TabCaption(2)   =   "String Encryption"
      TabPicture(2)   =   "Form1.frx":0038
      Tab(2).ControlEnabled=   0   'False
      Tab(2).Control(0)=   "SSTab5"
      Tab(2).Control(0).Enabled=   0   'False
      Tab(2).ControlCount=   1
      TabCaption(3)   =   "File Encryption"
      TabPicture(3)   =   "Form1.frx":0054
      Tab(3).ControlEnabled=   0   'False
      Tab(3).Control(0)=   "Frame7"
      Tab(3).Control(1)=   "Frame6"
      Tab(3).ControlCount=   2
      TabCaption(4)   =   "Digitally Sign A file"
      TabPicture(4)   =   "Form1.frx":0070
      Tab(4).ControlEnabled=   0   'False
      Tab(4).Control(0)=   "Frame19"
      Tab(4).Control(1)=   "Frame18"
      Tab(4).ControlCount=   2
      TabCaption(5)   =   "Verify Signatures"
      TabPicture(5)   =   "Form1.frx":008C
      Tab(5).ControlEnabled=   0   'False
      Tab(5).Control(0)=   "Frame20"
      Tab(5).ControlCount=   1
      Begin VB.Frame Frame18 
         Caption         =   "Sign a File"
         Height          =   6495
         Left            =   -74835
         TabIndex        =   160
         Top             =   495
         Width           =   5855
         Begin VB.CommandButton Command12 
            Caption         =   "..."
            Height          =   315
            Left            =   4920
            TabIndex        =   65
            Top             =   4515
            Width           =   360
         End
         Begin VB.CommandButton cmdSignFile 
            BackColor       =   &H00C0E0FF&
            Caption         =   "Sign File"
            Height          =   630
            Left            =   450
            Style           =   1  'Graphical
            TabIndex        =   161
            Top             =   1875
            Width           =   1680
         End
         Begin VB.TextBox txtSignFile 
            Height          =   285
            Left            =   405
            TabIndex        =   64
            Text            =   "C:\temp.txt"
            Top             =   4530
            Width           =   4515
         End
         Begin VB.TextBox txtSignKeyID 
            Height          =   300
            Left            =   2625
            TabIndex        =   62
            Top             =   2760
            Width           =   2385
         End
         Begin VB.TextBox txtSignKey 
            Height          =   285
            Left            =   2625
            TabIndex        =   60
            Text            =   "C:\"
            Top             =   2055
            Width           =   2100
         End
         Begin VB.TextBox txtSignPassword 
            Height          =   285
            Left            =   2625
            TabIndex        =   63
            Top             =   3420
            Width           =   2370
         End
         Begin VB.CommandButton Command11 
            Caption         =   "..."
            Height          =   285
            Left            =   4725
            TabIndex        =   61
            Top             =   2055
            Width           =   315
         End
         Begin VB.TextBox txtSignDest 
            Height          =   285
            Left            =   405
            TabIndex        =   66
            Text            =   "C:\Signed.txt"
            Top             =   5160
            Width           =   4515
         End
         Begin VB.CommandButton Command18 
            Caption         =   "..."
            Height          =   315
            Left            =   4920
            TabIndex        =   67
            Top             =   5160
            Width           =   360
         End
         Begin VB.Label Label52 
            Caption         =   "File to Sign"
            Height          =   225
            Left            =   405
            TabIndex        =   167
            Top             =   4320
            Width           =   4140
         End
         Begin VB.Label Label54 
            Caption         =   "ID of Key to use"
            Height          =   240
            Left            =   2625
            TabIndex        =   166
            Top             =   2565
            Width           =   2190
         End
         Begin VB.Label Label55 
            Caption         =   "Folder where Secret Key Ring is"
            Height          =   270
            Left            =   2625
            TabIndex        =   165
            Top             =   1845
            Width           =   2670
         End
         Begin VB.Label Label53 
            Caption         =   "Key Password"
            Height          =   480
            Left            =   2625
            TabIndex        =   164
            Top             =   3210
            Width           =   1890
         End
         Begin VB.Label Label56 
            Caption         =   $"Form1.frx":00A8
            Height          =   870
            Left            =   225
            TabIndex        =   163
            Top             =   420
            Width           =   5010
         End
         Begin VB.Label Label59 
            Caption         =   "Desination File (signed file)"
            Height          =   225
            Left            =   405
            TabIndex        =   162
            Top             =   4950
            Width           =   4140
         End
      End
      Begin VB.Frame Frame19 
         Caption         =   "Encrypt and Sign a File"
         Height          =   6495
         Left            =   -68685
         TabIndex        =   152
         Top             =   495
         Width           =   5855
         Begin VB.TextBox txtESEncryptID 
            Height          =   300
            Left            =   615
            TabIndex        =   70
            Top             =   1950
            Width           =   2385
         End
         Begin VB.TextBox txtESSignID 
            Height          =   300
            Left            =   615
            TabIndex        =   71
            Top             =   2580
            Width           =   2385
         End
         Begin VB.TextBox txtESKeyring 
            Height          =   285
            Left            =   615
            TabIndex        =   68
            Text            =   "C:\"
            Top             =   1350
            Width           =   2100
         End
         Begin VB.TextBox txtESPassword 
            Height          =   285
            Left            =   615
            TabIndex        =   72
            Top             =   3195
            Width           =   2370
         End
         Begin VB.CommandButton cmdESKeyRing 
            Caption         =   "..."
            Height          =   285
            Left            =   2715
            TabIndex        =   69
            Top             =   1350
            Width           =   315
         End
         Begin VB.CommandButton Command24 
            Caption         =   "..."
            Height          =   315
            Left            =   4695
            TabIndex        =   74
            Top             =   4515
            Width           =   360
         End
         Begin VB.TextBox txtESSourceFile 
            Height          =   285
            Left            =   615
            TabIndex        =   73
            Text            =   "C:\temp.txt"
            Top             =   4530
            Width           =   4095
         End
         Begin VB.TextBox txtESDestinationFile 
            Height          =   285
            Left            =   615
            TabIndex        =   75
            Text            =   "C:\Signed.txt"
            Top             =   5160
            Width           =   4095
         End
         Begin VB.CommandButton Command23 
            Caption         =   "..."
            Height          =   315
            Left            =   4680
            TabIndex        =   76
            Top             =   5145
            Width           =   360
         End
         Begin VB.CommandButton cmdEncryptSign 
            BackColor       =   &H00C0E0FF&
            Caption         =   "Encrypt and Sign File"
            Height          =   615
            Left            =   3435
            Style           =   1  'Graphical
            TabIndex        =   77
            Top             =   1305
            Width           =   1830
         End
         Begin VB.Label Label85 
            Caption         =   "ID of Key to use (Encrypt File)"
            Height          =   240
            Left            =   615
            TabIndex        =   159
            Top             =   1740
            Width           =   3210
         End
         Begin VB.Label Label84 
            Caption         =   "ID of Key to use (Sign File)"
            Height          =   240
            Left            =   615
            TabIndex        =   158
            Top             =   2370
            Width           =   3105
         End
         Begin VB.Label Label83 
            Caption         =   "Folder where Key Ring is located"
            Height          =   270
            Left            =   615
            TabIndex        =   157
            Top             =   1140
            Width           =   3165
         End
         Begin VB.Label Label82 
            Caption         =   "Key Password (Sign File)"
            Height          =   480
            Left            =   615
            TabIndex        =   156
            Top             =   3000
            Width           =   2820
         End
         Begin VB.Label Label81 
            Caption         =   "File to Encrypt and Sign"
            Height          =   225
            Left            =   615
            TabIndex        =   155
            Top             =   4320
            Width           =   4140
         End
         Begin VB.Label Label80 
            Caption         =   "Desination File"
            Height          =   225
            Left            =   615
            TabIndex        =   154
            Top             =   4950
            Width           =   4140
         End
         Begin VB.Label Label79 
            Caption         =   "This is a one stage process that allows you to Encrypt and Sign a File in one go."
            Height          =   570
            Left            =   165
            TabIndex        =   153
            Top             =   285
            Width           =   4140
         End
      End
      Begin VB.Frame frmPGPKeyGen 
         Caption         =   "Generate Keys"
         Height          =   6495
         Left            =   165
         TabIndex        =   129
         Top             =   495
         Width           =   12000
         Begin VB.TextBox txtKeyFolder 
            Height          =   330
            Left            =   390
            TabIndex        =   1
            Text            =   "C:\"
            Top             =   1440
            Width           =   2940
         End
         Begin VB.CommandButton cmdChooseFolder 
            Caption         =   "..."
            Height          =   345
            Left            =   3315
            TabIndex        =   2
            Top             =   1425
            Width           =   360
         End
         Begin VB.TextBox txtUserID 
            Height          =   345
            Left            =   6990
            TabIndex        =   5
            Top             =   2010
            Width           =   2250
         End
         Begin VB.TextBox txtPGPPassword 
            Height          =   330
            IMEMode         =   3  'DISABLE
            Left            =   7005
            TabIndex        =   6
            Top             =   2745
            Width           =   2250
         End
         Begin VB.TextBox txtPGPConfirmPassword 
            Height          =   330
            IMEMode         =   3  'DISABLE
            Left            =   7005
            TabIndex        =   7
            Top             =   3450
            Width           =   2250
         End
         Begin VB.CommandButton cmdGenKeys 
            BackColor       =   &H00C0E0FF&
            Caption         =   "Generate New Keys"
            Height          =   555
            Left            =   360
            Style           =   1  'Graphical
            TabIndex        =   8
            Top             =   4815
            Width           =   2205
         End
         Begin VB.ComboBox cmbKeySize 
            Height          =   288
            ItemData        =   "Form1.frx":01BE
            Left            =   396
            List            =   "Form1.frx":01C0
            Style           =   2  'Dropdown List
            TabIndex        =   3
            Top             =   2970
            Width           =   2940
         End
         Begin VB.ComboBox cmbKeyType 
            Height          =   288
            Left            =   396
            Style           =   2  'Dropdown List
            TabIndex        =   4
            Top             =   3900
            Width           =   1800
         End
         Begin VB.Label Label77 
            Caption         =   "The more bits that are used, the stronger the encryption but the slower the key generation and encryption becomes."
            Height          =   540
            Index           =   27
            Left            =   390
            TabIndex        =   136
            Top             =   2550
            Width           =   4245
         End
         Begin VB.Label Label7 
            Caption         =   "Folder to place the new keys"
            Height          =   270
            Left            =   390
            TabIndex        =   139
            Top             =   1215
            Width           =   3735
         End
         Begin VB.Label Label77 
            Caption         =   $"Form1.frx":01C2
            Height          =   495
            Index           =   29
            Left            =   390
            TabIndex        =   138
            Top             =   420
            Width           =   9510
         End
         Begin VB.Label Label21 
            Caption         =   "Key size to use, 1024 bit -> 4096 bit "
            Height          =   645
            Left            =   390
            TabIndex        =   137
            Top             =   2220
            Width           =   3270
         End
         Begin VB.Label Label23 
            Caption         =   "Key ID"
            Height          =   240
            Left            =   6990
            TabIndex        =   135
            Top             =   1800
            Width           =   1770
         End
         Begin VB.Label Label24 
            Caption         =   "Key Password"
            Height          =   240
            Left            =   7005
            TabIndex        =   134
            Top             =   2535
            Width           =   2250
         End
         Begin VB.Label Label25 
            Caption         =   "Confirm Password"
            Height          =   255
            Left            =   6990
            TabIndex        =   133
            Top             =   3240
            Width           =   2175
         End
         Begin VB.Label Label77 
            Caption         =   "The keys ID is used to identify the key, this should be something unique like an email address."
            Height          =   465
            Index           =   28
            Left            =   6990
            TabIndex        =   132
            Top             =   1230
            Width           =   3750
         End
         Begin VB.Label Label58 
            Caption         =   "Key Type, RSA or DH/DSS"
            Height          =   300
            Left            =   390
            TabIndex        =   131
            Top             =   3690
            Width           =   2745
         End
         Begin VB.Label Label77 
            Caption         =   "Please be patient, depending on the speed of your PC and the keysize you select it could take 10 seconds to generate new keys."
            Height          =   660
            Index           =   26
            Left            =   2670
            TabIndex        =   130
            Top             =   4785
            Width           =   3525
         End
      End
      Begin VB.Frame Frame6 
         Caption         =   "Encrypt the File"
         Height          =   6495
         Left            =   -74835
         TabIndex        =   123
         Top             =   495
         Width           =   5855
         Begin VB.TextBox txtPGPFileKeyring 
            Height          =   285
            Left            =   2160
            TabIndex        =   44
            Text            =   "C:\"
            Top             =   1770
            Width           =   2385
         End
         Begin VB.TextBox txtPGPFileUserID 
            Height          =   300
            Left            =   2145
            TabIndex        =   46
            Text            =   "ID"
            Top             =   2520
            Width           =   2388
         End
         Begin VB.TextBox txtPGPDestinationFile 
            Height          =   285
            Left            =   240
            TabIndex        =   49
            Text            =   "c:\encrypted.txt"
            Top             =   4290
            Width           =   4455
         End
         Begin VB.TextBox txtPGPSourceFile 
            Height          =   285
            Left            =   240
            TabIndex        =   47
            Text            =   "c:\temp.txt"
            Top             =   3615
            Width           =   4470
         End
         Begin VB.CommandButton cmdPGPEncryptFile 
            BackColor       =   &H00C0E0FF&
            Caption         =   "Encrypt File"
            Height          =   630
            Left            =   300
            Style           =   1  'Graphical
            TabIndex        =   51
            Top             =   1320
            Width           =   1680
         End
         Begin VB.CommandButton Command4 
            Caption         =   "..."
            Height          =   315
            Left            =   4695
            TabIndex        =   48
            Top             =   3615
            Width           =   360
         End
         Begin VB.CommandButton Command1 
            Caption         =   "..."
            Height          =   315
            Left            =   4680
            TabIndex        =   50
            Top             =   4290
            Width           =   360
         End
         Begin VB.CommandButton Command16 
            Caption         =   "..."
            Height          =   288
            Left            =   4536
            TabIndex        =   45
            Top             =   1770
            Width           =   312
         End
         Begin VB.Label Label77 
            Caption         =   "The Folder that contains the Public Keyring"
            Height          =   645
            Index           =   39
            Left            =   2145
            TabIndex        =   128
            Top             =   1350
            Width           =   2685
         End
         Begin VB.Label Label77 
            Caption         =   "ID of Key to use"
            Height          =   480
            Index           =   40
            Left            =   2160
            TabIndex        =   127
            Top             =   2325
            Width           =   2655
         End
         Begin VB.Label Label33 
            Caption         =   "The Encrypted File (Destination File)"
            Height          =   195
            Left            =   240
            TabIndex        =   126
            Top             =   4095
            Width           =   4185
         End
         Begin VB.Label Label32 
            Caption         =   "File to Encrypt"
            Height          =   225
            Left            =   240
            TabIndex        =   125
            Top             =   3420
            Width           =   4140
         End
         Begin VB.Label Label77 
            Caption         =   "These are the only properties that are required to be set to Encrypt a file."
            Height          =   915
            Index           =   42
            Left            =   360
            TabIndex        =   124
            Top             =   375
            Width           =   4050
         End
      End
      Begin VB.Frame Frame7 
         Caption         =   "Decrypt the File"
         Height          =   6495
         Left            =   -68685
         TabIndex        =   117
         Top             =   495
         Width           =   5855
         Begin VB.TextBox txtPGPFilePassword 
            Height          =   285
            Left            =   2112
            TabIndex        =   54
            Text            =   "The Password"
            Top             =   2520
            Width           =   2385
         End
         Begin VB.TextBox txtPGPFileSecretKeyring 
            Height          =   285
            Left            =   2112
            TabIndex        =   52
            Text            =   "C:\"
            Top             =   1770
            Width           =   2385
         End
         Begin VB.TextBox txtPGPDecryptDestinationFile 
            Height          =   285
            Left            =   300
            TabIndex        =   57
            Text            =   "c:\temp.txt"
            Top             =   4335
            Width           =   4104
         End
         Begin VB.TextBox txtPGPDecryptSourceFile 
            Height          =   285
            Left            =   300
            TabIndex        =   55
            Text            =   "c:\encrypted.txt"
            Top             =   3660
            Width           =   4116
         End
         Begin VB.CommandButton Command8 
            Caption         =   "..."
            Height          =   315
            Left            =   4404
            TabIndex        =   56
            Top             =   3630
            Width           =   360
         End
         Begin VB.CommandButton Command7 
            Caption         =   "..."
            Height          =   315
            Left            =   4392
            TabIndex        =   58
            Top             =   4320
            Width           =   360
         End
         Begin VB.CommandButton cmdPGPDecryptFile 
            BackColor       =   &H00C0E0FF&
            Caption         =   "Decrypt File"
            Height          =   660
            Left            =   225
            Style           =   1  'Graphical
            TabIndex        =   59
            Top             =   1320
            Width           =   1680
         End
         Begin VB.CommandButton Command17 
            Caption         =   "..."
            Height          =   288
            Left            =   4488
            TabIndex        =   53
            Top             =   1755
            Width           =   312
         End
         Begin VB.Label Label77 
            Caption         =   "The Password for the key"
            Height          =   270
            Index           =   38
            Left            =   2085
            TabIndex        =   122
            Top             =   2310
            Width           =   2415
         End
         Begin VB.Label Label77 
            Caption         =   "The Folder that contains the Secret Keyring"
            Height          =   540
            Index           =   37
            Left            =   2100
            TabIndex        =   121
            Top             =   1335
            Width           =   2550
         End
         Begin VB.Label Label37 
            Caption         =   "The Decrypted File (Destination File)"
            Height          =   195
            Left            =   300
            TabIndex        =   120
            Top             =   4140
            Width           =   4185
         End
         Begin VB.Label Label36 
            Caption         =   "File to Decrypt"
            Height          =   225
            Left            =   300
            TabIndex        =   119
            Top             =   3465
            Width           =   4140
         End
         Begin VB.Label Label77 
            Caption         =   "These are the only properties that are required to be set to Decrypt a file."
            Height          =   915
            Index           =   43
            Left            =   240
            TabIndex        =   118
            Top             =   375
            Width           =   4050
         End
      End
      Begin VB.Frame Frame20 
         Caption         =   "Decrypt and Verify a File"
         Height          =   6495
         Left            =   -74835
         TabIndex        =   86
         Top             =   495
         Width           =   12000
         Begin VB.TextBox txtDecryptVerify 
            Height          =   285
            Left            =   240
            TabIndex        =   78
            Text            =   "C:\"
            Top             =   1815
            Width           =   2100
         End
         Begin VB.TextBox txtDecryptVerifyPassword 
            Height          =   285
            Left            =   240
            TabIndex        =   80
            Top             =   2850
            Width           =   2370
         End
         Begin VB.CommandButton cmdDecryptVerify 
            Caption         =   "..."
            Height          =   285
            Left            =   2325
            TabIndex        =   79
            Top             =   1815
            Width           =   315
         End
         Begin VB.CommandButton cmdDecryptVerifySource 
            Caption         =   "..."
            Height          =   315
            Left            =   4320
            TabIndex        =   82
            Top             =   3735
            Width           =   360
         End
         Begin VB.TextBox txtDecryptVerifySource 
            Height          =   285
            Left            =   240
            TabIndex        =   81
            Text            =   "C:\temp.txt"
            Top             =   3750
            Width           =   4095
         End
         Begin VB.TextBox txtDecryptVerifyDestination 
            Height          =   285
            Left            =   240
            TabIndex        =   83
            Text            =   "C:\output.txt"
            Top             =   4380
            Width           =   4095
         End
         Begin VB.CommandButton cmdDecryptVerifyDestination 
            Caption         =   "..."
            Height          =   315
            Left            =   4305
            TabIndex        =   84
            Top             =   4365
            Width           =   360
         End
         Begin VB.CommandButton cmdDecryptAndVerify 
            BackColor       =   &H00C0E0FF&
            Caption         =   "Decrypt and Verify File"
            Height          =   615
            Left            =   240
            Style           =   1  'Graphical
            TabIndex        =   85
            Top             =   5205
            Width           =   2145
         End
         Begin VB.Label Label9 
            Caption         =   $"Form1.frx":024C
            Height          =   675
            Left            =   240
            TabIndex        =   87
            Top             =   1335
            Width           =   5385
         End
         Begin VB.Label Label11 
            Caption         =   "Folder where Key Ring is located"
            Height          =   270
            Left            =   240
            TabIndex        =   92
            Top             =   1080
            Width           =   4935
         End
         Begin VB.Label Label12 
            Caption         =   "Key Password, this is for the decrypting of the file"
            Height          =   480
            Left            =   240
            TabIndex        =   91
            Top             =   2640
            Width           =   3915
         End
         Begin VB.Label Label13 
            Caption         =   "File to Decrypt"
            Height          =   225
            Left            =   240
            TabIndex        =   90
            Top             =   3540
            Width           =   4140
         End
         Begin VB.Label Label14 
            Caption         =   "Desination File"
            Height          =   225
            Left            =   240
            TabIndex        =   89
            Top             =   4170
            Width           =   4140
         End
         Begin VB.Label Label15 
            Caption         =   "This is a one stage process that allows you to Encrypt and Sign a File in one go."
            Height          =   570
            Left            =   225
            TabIndex        =   88
            Top             =   510
            Width           =   4140
         End
      End
      Begin TabDlg.SSTab SSTab4 
         Height          =   6525
         Left            =   -74835
         TabIndex        =   9
         Top             =   450
         Width           =   12000
         _ExtentX        =   21167
         _ExtentY        =   11509
         _Version        =   393216
         Style           =   1
         Tabs            =   6
         Tab             =   1
         TabsPerRow      =   6
         TabHeight       =   520
         TabCaption(0)   =   "Key Extraction"
         TabPicture(0)   =   "Form1.frx":02DF
         Tab(0).ControlEnabled=   0   'False
         Tab(0).Control(0)=   "Frame5"
         Tab(0).ControlCount=   1
         TabCaption(1)   =   "Add Keys"
         TabPicture(1)   =   "Form1.frx":02FB
         Tab(1).ControlEnabled=   -1  'True
         Tab(1).Control(0)=   "Frame11"
         Tab(1).Control(0).Enabled=   0   'False
         Tab(1).ControlCount=   1
         TabCaption(2)   =   "Whats in a KeyRing?"
         TabPicture(2)   =   "Form1.frx":0317
         Tab(2).ControlEnabled=   0   'False
         Tab(2).Control(0)=   "Frame23"
         Tab(2).ControlCount=   1
         TabCaption(3)   =   "Delete Keys"
         TabPicture(3)   =   "Form1.frx":0333
         Tab(3).ControlEnabled=   0   'False
         Tab(3).Control(0)=   "Frame2"
         Tab(3).ControlCount=   1
         TabCaption(4)   =   "Key Info"
         TabPicture(4)   =   "Form1.frx":034F
         Tab(4).ControlEnabled=   0   'False
         Tab(4).Control(0)=   "Frame3"
         Tab(4).ControlCount=   1
         TabCaption(5)   =   "Key Fingerprint"
         TabPicture(5)   =   "Form1.frx":036B
         Tab(5).ControlEnabled=   0   'False
         Tab(5).Control(0)=   "Frame4"
         Tab(5).ControlCount=   1
         Begin VB.Frame Frame4 
            Caption         =   "Key Fingerprint"
            Height          =   5850
            Left            =   -74835
            TabIndex        =   149
            Top             =   495
            Width           =   11655
            Begin VB.CommandButton cmdKeyFingerprint 
               BackColor       =   &H00C0E0FF&
               Caption         =   "Get Key Fingerprint"
               Height          =   570
               Left            =   525
               Style           =   1  'Graphical
               TabIndex        =   32
               Top             =   2715
               Width           =   2220
            End
            Begin VB.TextBox txtKeyFingerprint 
               Height          =   5190
               Left            =   3684
               MultiLine       =   -1  'True
               ScrollBars      =   3  'Both
               TabIndex        =   31
               Top             =   456
               Width           =   7725
            End
            Begin VB.Label Label77 
               Caption         =   "You can paste in any key here and get the fingerprint for it."
               Height          =   1050
               Index           =   2
               Left            =   255
               TabIndex        =   151
               Top             =   465
               Width           =   3150
            End
            Begin VB.Label Label5 
               Caption         =   "The Key"
               Height          =   288
               Left            =   3672
               TabIndex        =   150
               Top             =   252
               Width           =   4488
            End
         End
         Begin VB.Frame Frame3 
            Caption         =   "Key Info"
            Height          =   5850
            Left            =   -74835
            TabIndex        =   145
            Top             =   495
            Width           =   11655
            Begin VB.TextBox txtKeyInfo 
               Height          =   5190
               Left            =   3684
               MultiLine       =   -1  'True
               ScrollBars      =   3  'Both
               TabIndex        =   29
               Top             =   456
               Width           =   7725
            End
            Begin VB.CommandButton cmdGetKeyInfo 
               BackColor       =   &H00C0E0FF&
               Caption         =   "Get Key Info"
               Height          =   570
               Left            =   540
               Style           =   1  'Graphical
               TabIndex        =   30
               Top             =   2820
               Width           =   2220
            End
            Begin VB.Label Label6 
               Caption         =   "The Key"
               Height          =   288
               Left            =   3672
               TabIndex        =   147
               Top             =   252
               Width           =   4488
            End
            Begin VB.Label Label77 
               Caption         =   "You can paste in any key here and get information about it. For example what algorithm it uses and the keysize."
               Height          =   1050
               Index           =   1
               Left            =   255
               TabIndex        =   146
               Top             =   465
               Width           =   3150
            End
         End
         Begin VB.Frame Frame2 
            Caption         =   "Delete a key from a keyring"
            Height          =   5850
            Left            =   -74835
            TabIndex        =   142
            Top             =   495
            Width           =   11655
            Begin VB.TextBox txtDelKeyID 
               Height          =   330
               Left            =   585
               TabIndex        =   24
               Text            =   "hello"
               Top             =   1650
               Width           =   3240
            End
            Begin VB.CommandButton cmdDelPublicKey 
               BackColor       =   &H00C0E0FF&
               Caption         =   "Delete the key from the Public Keyring"
               Height          =   630
               Left            =   1035
               Style           =   1  'Graphical
               TabIndex        =   27
               Top             =   3030
               Width           =   2220
            End
            Begin VB.CommandButton cmdDelSecretKey 
               BackColor       =   &H00C0E0FF&
               Caption         =   "Delete the key from the Secret Keyring"
               Height          =   630
               Left            =   1035
               Style           =   1  'Graphical
               TabIndex        =   28
               Top             =   3810
               Width           =   2220
            End
            Begin VB.CommandButton Command3 
               Caption         =   "..."
               Height          =   300
               Left            =   3510
               TabIndex        =   26
               Top             =   2295
               Width           =   315
            End
            Begin VB.TextBox txtKeyFolderDelKey 
               Height          =   285
               Left            =   600
               TabIndex        =   25
               Text            =   "C:\"
               Top             =   2295
               Width           =   2910
            End
            Begin VB.Label Label10 
               Caption         =   "ID of key to delete"
               Height          =   255
               Left            =   585
               TabIndex        =   148
               Top             =   1440
               Width           =   3240
            End
            Begin VB.Label Label77 
               Caption         =   "You can delete specific Public or Private keys from either keyring"
               Height          =   1050
               Index           =   0
               Left            =   630
               TabIndex        =   144
               Top             =   795
               Width           =   3150
            End
            Begin VB.Label Label4 
               Caption         =   "Folder where Keyring is located"
               Height          =   270
               Left            =   600
               TabIndex        =   143
               Top             =   2085
               Width           =   3405
            End
         End
         Begin VB.Frame Frame5 
            Caption         =   "Extract a key from a key ring file"
            Height          =   5850
            Left            =   -74835
            TabIndex        =   101
            Top             =   495
            Width           =   11655
            Begin VB.CommandButton cmdChooseKey 
               Caption         =   "..."
               Height          =   300
               Left            =   3135
               TabIndex        =   11
               Top             =   1980
               Width           =   315
            End
            Begin VB.TextBox txtExtractedKey 
               Height          =   5175
               Left            =   3684
               MultiLine       =   -1  'True
               ScrollBars      =   3  'Both
               TabIndex        =   13
               Top             =   456
               Width           =   7740
            End
            Begin VB.CommandButton cmdExtract 
               BackColor       =   &H00C0E0FF&
               Caption         =   "Extract the Key"
               Height          =   570
               Left            =   225
               Style           =   1  'Graphical
               TabIndex        =   14
               Top             =   3360
               Width           =   2220
            End
            Begin VB.TextBox txtPubKeyExtract 
               Height          =   285
               Left            =   225
               TabIndex        =   10
               Text            =   "C:\"
               Top             =   1980
               Width           =   2910
            End
            Begin VB.TextBox txtKeyIDExtract 
               Height          =   330
               Left            =   225
               TabIndex        =   12
               Text            =   "hello"
               Top             =   2655
               Width           =   3240
            End
            Begin VB.Label Label42 
               Caption         =   "The Key"
               Height          =   285
               Left            =   3675
               TabIndex        =   105
               Top             =   240
               Width           =   4485
            End
            Begin VB.Label Label77 
               Caption         =   $"Form1.frx":0387
               Height          =   1050
               Index           =   30
               Left            =   210
               TabIndex        =   104
               Top             =   645
               Width           =   3150
            End
            Begin VB.Label Label30 
               Caption         =   "Folder where Keyring is located"
               Height          =   270
               Left            =   225
               TabIndex        =   103
               Top             =   1755
               Width           =   3405
            End
            Begin VB.Label Label31 
               Caption         =   "ID of key to extract"
               Height          =   255
               Left            =   225
               TabIndex        =   102
               Top             =   2445
               Width           =   3240
            End
         End
         Begin VB.Frame Frame11 
            Caption         =   "Add a key to a key ring"
            Height          =   5850
            Left            =   165
            TabIndex        =   97
            Top             =   495
            Width           =   11655
            Begin VB.TextBox txtAddKey 
               Height          =   285
               Left            =   180
               TabIndex        =   15
               Text            =   "C:\"
               Top             =   1980
               Width           =   2910
            End
            Begin VB.CommandButton cmdAddKey 
               BackColor       =   &H00C0E0FF&
               Caption         =   "Add the Key"
               Height          =   570
               Left            =   660
               Style           =   1  'Graphical
               TabIndex        =   18
               Top             =   2760
               Width           =   2220
            End
            Begin VB.TextBox txtTheKey 
               Height          =   5220
               Left            =   3684
               MultiLine       =   -1  'True
               ScrollBars      =   3  'Both
               TabIndex        =   17
               Top             =   456
               Width           =   7755
            End
            Begin VB.CommandButton Command15 
               Caption         =   "..."
               Height          =   300
               Left            =   3090
               TabIndex        =   16
               Top             =   1980
               Width           =   315
            End
            Begin VB.Label Label61 
               Caption         =   "Folder where Keyring is located"
               Height          =   270
               Left            =   180
               TabIndex        =   100
               Top             =   1770
               Width           =   3405
            End
            Begin VB.Label Label77 
               Caption         =   "The ability to add a key to a keyring is important as a key ring is the best place to store all of your keys. "
               Height          =   1050
               Index           =   31
               Left            =   165
               TabIndex        =   99
               Top             =   420
               Width           =   3150
            End
            Begin VB.Label Label63 
               Caption         =   "The Key"
               Height          =   288
               Left            =   3672
               TabIndex        =   98
               Top             =   252
               Width           =   4488
            End
         End
         Begin VB.Frame Frame23 
            Caption         =   "View the Contents of a KeyRing"
            Height          =   5850
            Left            =   -74835
            TabIndex        =   93
            Top             =   495
            Width           =   11655
            Begin VB.CommandButton Command22 
               Caption         =   "..."
               Height          =   300
               Left            =   3120
               TabIndex        =   20
               Top             =   2010
               Width           =   315
            End
            Begin VB.TextBox txtKeyRingContents 
               Height          =   5175
               Left            =   3684
               MultiLine       =   -1  'True
               ScrollBars      =   3  'Both
               TabIndex        =   21
               Top             =   456
               Width           =   7740
            End
            Begin VB.CommandButton cmdGetPublicRing 
               BackColor       =   &H00C0E0FF&
               Caption         =   "View the contents of the Public Keyring"
               Height          =   630
               Left            =   660
               Style           =   1  'Graphical
               TabIndex        =   22
               Top             =   2730
               Width           =   2220
            End
            Begin VB.TextBox txtKeyRingContentsFolder 
               Height          =   285
               Left            =   210
               TabIndex        =   19
               Text            =   "C:\"
               Top             =   2010
               Width           =   2910
            End
            Begin VB.CommandButton cmdGetSecretRing 
               BackColor       =   &H00C0E0FF&
               Caption         =   "View the contents of the Secret Keyring"
               Height          =   630
               Left            =   660
               Style           =   1  'Graphical
               TabIndex        =   23
               Top             =   3510
               Width           =   2220
            End
            Begin VB.Label Label1 
               Caption         =   "KeyRing Contents"
               Height          =   285
               Left            =   3690
               TabIndex        =   96
               Top             =   240
               Width           =   4485
            End
            Begin VB.Label Label77 
               Caption         =   "You can specify a keyring, and then see what keys are stored in the keyring."
               Height          =   1050
               Index           =   41
               Left            =   210
               TabIndex        =   95
               Top             =   510
               Width           =   3150
            End
            Begin VB.Label Label8 
               Caption         =   "The Keyring Folder"
               Height          =   270
               Left            =   210
               TabIndex        =   94
               Top             =   1815
               Width           =   3405
            End
         End
      End
      Begin TabDlg.SSTab SSTab5 
         Height          =   6525
         Left            =   -74835
         TabIndex        =   33
         Top             =   450
         Width           =   12000
         _ExtentX        =   21167
         _ExtentY        =   11509
         _Version        =   393216
         Style           =   1
         Tabs            =   2
         TabsPerRow      =   4
         TabHeight       =   520
         TabCaption(0)   =   "Encrypt Strings"
         TabPicture(0)   =   "Form1.frx":0439
         Tab(0).ControlEnabled=   -1  'True
         Tab(0).Control(0)=   "Frame1"
         Tab(0).Control(0).Enabled=   0   'False
         Tab(0).ControlCount=   1
         TabCaption(1)   =   "Decrypt Strings"
         TabPicture(1)   =   "Form1.frx":0455
         Tab(1).ControlEnabled=   0   'False
         Tab(1).Control(0)=   "Frame8"
         Tab(1).ControlCount=   1
         Begin VB.Frame Frame1 
            Caption         =   "Encrypt some text with an extracted public key"
            Height          =   5850
            Left            =   165
            TabIndex        =   113
            Top             =   495
            Width           =   11655
            Begin VB.TextBox txtPubKey 
               Height          =   4470
               Left            =   255
               MultiLine       =   -1  'True
               ScrollBars      =   3  'Both
               TabIndex        =   34
               Text            =   "Form1.frx":0471
               Top             =   1120
               Width           =   4065
            End
            Begin VB.CommandButton cmdPGPEncrypt 
               BackColor       =   &H00C0E0FF&
               Caption         =   "&Encrypt String"
               Height          =   390
               Left            =   5250
               Style           =   1  'Graphical
               TabIndex        =   37
               Top             =   372
               Width           =   1830
            End
            Begin VB.TextBox txtText2Encrypt 
               Height          =   4470
               Left            =   4425
               MultiLine       =   -1  'True
               ScrollBars      =   3  'Both
               TabIndex        =   35
               Text            =   "Form1.frx":05D9
               Top             =   1120
               Width           =   3465
            End
            Begin VB.TextBox txtEncryptedText 
               Height          =   4470
               Left            =   7980
               MultiLine       =   -1  'True
               ScrollBars      =   3  'Both
               TabIndex        =   36
               Top             =   1120
               Width           =   3390
            End
            Begin VB.Label Label43 
               Caption         =   "The Encrypted text"
               Height          =   285
               Left            =   7965
               TabIndex        =   116
               Top             =   915
               Width           =   2085
            End
            Begin VB.Label Label27 
               Caption         =   "Public key to use to encrypt the string"
               Height          =   765
               Left            =   270
               TabIndex        =   115
               Top             =   900
               Width           =   3450
            End
            Begin VB.Label Label28 
               Caption         =   "Text to Encrypt"
               Height          =   840
               Left            =   4425
               TabIndex        =   114
               Top             =   915
               Width           =   2880
            End
         End
         Begin VB.Frame Frame8 
            Caption         =   "Decrypt a PGP encrypted string"
            Height          =   5850
            Left            =   -74835
            TabIndex        =   106
            Top             =   495
            Width           =   11655
            Begin VB.CommandButton txtPGPDecrypt 
               BackColor       =   &H00C0E0FF&
               Caption         =   "&Decrypt String"
               Height          =   390
               Left            =   5400
               Style           =   1  'Graphical
               TabIndex        =   43
               Top             =   300
               Width           =   1965
            End
            Begin VB.TextBox txtPGPSecRing 
               Height          =   330
               Left            =   210
               TabIndex        =   38
               Text            =   "C:\"
               Top             =   1065
               Width           =   2784
            End
            Begin VB.TextBox txtPGPDecryptPassword 
               Height          =   330
               Left            =   210
               TabIndex        =   40
               Top             =   1770
               Width           =   2772
            End
            Begin VB.CommandButton cmdChooseSecRing 
               Caption         =   "..."
               Height          =   330
               Left            =   2988
               TabIndex        =   39
               Top             =   1068
               Width           =   330
            End
            Begin VB.TextBox txtDecryptedPGPText 
               Height          =   4905
               Left            =   7500
               MultiLine       =   -1  'True
               ScrollBars      =   3  'Both
               TabIndex        =   42
               Top             =   780
               Width           =   3975
            End
            Begin VB.TextBox txtPGPText 
               Height          =   4905
               Left            =   3480
               MultiLine       =   -1  'True
               ScrollBars      =   3  'Both
               TabIndex        =   41
               Top             =   780
               Width           =   3900
            End
            Begin VB.Label Label77 
               Caption         =   "Specify the folder where the secret keyring is located."
               Height          =   516
               Index           =   36
               Left            =   228
               TabIndex        =   112
               Top             =   660
               Width           =   2556
            End
            Begin VB.Label Label77 
               Caption         =   "The Decrypted (Plain) text"
               Height          =   285
               Index           =   34
               Left            =   7485
               TabIndex        =   111
               Top             =   555
               Width           =   2805
            End
            Begin VB.Label Label45 
               Caption         =   "The Secret Key Password"
               Height          =   315
               Left            =   210
               TabIndex        =   110
               Top             =   1560
               Width           =   3300
            End
            Begin VB.Label Label77 
               Caption         =   "Cryptocx will automatically search the Secret key ring for the correct secret key to use to decrypt the encrypted text."
               Height          =   675
               Index           =   32
               Left            =   210
               TabIndex        =   109
               Top             =   2280
               Width           =   3180
            End
            Begin VB.Label Label77 
               Caption         =   "So there is no need to specify the User ID for the secret key to use."
               Height          =   612
               Index           =   33
               Left            =   216
               TabIndex        =   108
               Top             =   2940
               Width           =   3120
            End
            Begin VB.Label Label77 
               Caption         =   "Text to Decrypt"
               Height          =   840
               Index           =   35
               Left            =   3465
               TabIndex        =   107
               Top             =   555
               Width           =   3000
            End
         End
      End
   End
   Begin MSComDlg.CommonDialog SelFileDlg 
      Left            =   11385
      Top             =   300
      _ExtentX        =   688
      _ExtentY        =   688
      _Version        =   393216
   End
   Begin VB.Label Label3 
      Caption         =   $"Form1.frx":05FD
      Height          =   1035
      Left            =   165
      TabIndex        =   140
      Top             =   435
      Width           =   10590
   End
   Begin VB.Label Label2 
      Caption         =   "Cryptocx v7 can encrypt and decrypt files and strings in a way that is FULLY compatible with the latest release of PGP."
      Height          =   600
      Left            =   165
      TabIndex        =   141
      Top             =   90
      Width           =   10620
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdAddKey_Click()
    ''
    '' Add a key to a keyring
    ''
    Dim Cryptocx As New EasyByte_Software.Cryptocxv7
    Dim theResult As String
    
    Cryptocx.LicenseKey = "DEMO"
    
    
    Cryptocx.KeyFolder = txtAddKey.Text
    
    '' You can specify either a public or a private key to teh according property
    ''
    Cryptocx.PublicKey = txtTheKey.Text
    
    theResult = Cryptocx.PGPAddKeyToKeyRing
    
    
    '' Check to see what has happened
    ''
    If theResult = "TRUE" Then
        '' Ok, the key addition went well with no errors
        MsgBox "Key added"
    Else
        MsgBox theResult
    End If
    
End Sub

Private Sub cmdChooseFolder_Click()
On Error Resume Next

Dim oShell As Shell
Dim oFolder As Folder
Dim oFolderItem As FolderItem
    Set oShell = New Shell
    Set oFolder = oShell.BrowseForFolder(0, "Select folder", &H1 + &H10 + &H20 + &H40 + &H8, 0)
    If IsNull(oFolder) And mCancelError Then
        Call Err.Raise(vbObjectError + 1)
    Else
        Set oFolderItem = oFolder.Items.Item
        txtKeyFolder.Text = Trim(oFolderItem.Path)
        
        Set oFolderItem = Nothing
    End If
    Set oFolder = Nothing
    Set oShell = Nothing
End Sub

Private Sub cmdChooseKey_Click()
On Error Resume Next

Dim oShell As Shell
Dim oFolder As Folder
Dim oFolderItem As FolderItem
    Set oShell = New Shell
    Set oFolder = oShell.BrowseForFolder(0, "Select folder", &H1 + &H10 + &H20 + &H40 + &H8, 0)
    If IsNull(oFolder) And mCancelError Then
        Call Err.Raise(vbObjectError + 1)
    Else
        Set oFolderItem = oFolder.Items.Item
        txtPubKeyExtract.Text = Trim(oFolderItem.Path)
        
        Set oFolderItem = Nothing
    End If
    Set oFolder = Nothing
    Set oShell = Nothing
End Sub

Private Sub cmdChooseSecRing_Click()
On Error Resume Next

Dim oShell As Shell
Dim oFolder As Folder
Dim oFolderItem As FolderItem
    Set oShell = New Shell
    Set oFolder = oShell.BrowseForFolder(0, "Select folder", &H1 + &H10 + &H20 + &H40 + &H8, 0)
    If IsNull(oFolder) And mCancelError Then
        Call Err.Raise(vbObjectError + 1)
    Else
        Set oFolderItem = oFolder.Items.Item
        txtPGPSecRing.Text = Trim(oFolderItem.Path)
        
        Set oFolderItem = Nothing
    End If
    Set oFolder = Nothing
    Set oShell = Nothing
End Sub

Private Sub cmdDecryptAndVerify_Click()
''
'' Decrypt and Verify a File
''
 Dim theResult As String
 Dim Cryptocx As New EasyByte_Software.Cryptocxv7
 
 
 Cryptocx.LicenseKey = "DEMO"

 Cryptocx.KeyFolder = txtDecryptVerify.Text
 Cryptocx.Password = txtDecryptVerifyPassword.Text
 Cryptocx.SourceFile = txtDecryptVerifySource.Text
 Cryptocx.DestinationFile = txtDecryptVerifyDestination.Text
 theResult = Cryptocx.PGPDecryptVerifyFile
 
 
 If theResult = "TRUE" Then
  '' Alls ok, the file was decrypted and verified that the signature was ok
 Else
  MsgBox OutPut
 End If
 

 '' Free up Memory Resources
 ''
 Set Cryptocx = Nothing
End Sub

Private Sub cmdDecryptVerify_Click()
On Error Resume Next

Dim oShell As Shell
Dim oFolder As Folder
Dim oFolderItem As FolderItem
    Set oShell = New Shell
    Set oFolder = oShell.BrowseForFolder(0, "Select folder", &H1 + &H10 + &H20 + &H40 + &H8, 0)
    If IsNull(oFolder) And mCancelError Then
        Call Err.Raise(vbObjectError + 1)
    Else
        Set oFolderItem = oFolder.Items.Item
        txtDecryptVerify.Text = Trim(oFolderItem.Path)
        
        Set oFolderItem = Nothing
    End If
    Set oFolder = Nothing
    Set oShell = Nothing
End Sub

Private Sub cmdDecryptVerifyDestination_Click()
  Dim CRTF_Text As Integer
CRTF_Text = 1
On Error Resume Next

SelFileDlg.Filter = "All Files (*.*)|*.*"
SelFileDlg.FilterIndex = 0
SelFileDlg.DialogTitle = "Choose a File"
SelFileDlg.InitDir = App.Path
SelFileDlg.Flags = cdlOFNHideReadOnly
SelFileDlg.ShowOpen

 If Trim(SelFileDlg.FileName) = "" Then
 Else
  txtDecryptVerifyDestination.Text = Trim(SelFileDlg.FileName)
 End If

If Err = 321 Then
 If Trim(SelFileDlg.FileName) = "" Then
 Else
  txtDecryptVerifyDestination.Text = Trim(SelFileDlg.FileName)
 End If
ElseIf Err <> 0 Then
 GoTo Error_Open
End If

Exit Sub
Error_Open:
 MsgBox$ ("An error has occured. Error " & Err & " " & Error)
Exit Sub
End Sub

Private Sub cmdDecryptVerifySource_Click()
  Dim CRTF_Text As Integer
CRTF_Text = 1
On Error Resume Next

SelFileDlg.Filter = "All Files (*.*)|*.*"
SelFileDlg.FilterIndex = 0
SelFileDlg.DialogTitle = "Choose a File"
SelFileDlg.InitDir = App.Path
SelFileDlg.Flags = cdlOFNHideReadOnly
SelFileDlg.ShowOpen

 If Trim(SelFileDlg.FileName) = "" Then
 Else
  txtDecryptVerifySource.Text = Trim(SelFileDlg.FileName)
 End If

If Err = 321 Then
 If Trim(SelFileDlg.FileName) = "" Then
 Else
  txtDecryptVerifySource.Text = Trim(SelFileDlg.FileName)
 End If
ElseIf Err <> 0 Then
 GoTo Error_Open
End If

Exit Sub
Error_Open:
 MsgBox$ ("An error has occured. Error " & Err & " " & Error)
Exit Sub
End Sub

Private Sub cmdDelPublicKey_Click()
 ''
 '' Delete the public Key
 ''
 Dim theResult As String
 Dim Cryptocx As New EasyByte_Software.Cryptocxv7
 
 Cryptocx.LicenseKey = "DEMO"
 Cryptocx.KeyID = txtDelKeyID.Text
 Cryptocx.KeyFolder = txtKeyFolderDelKey.Text
 
 '' Delete the Key
 ''
 theResult = Cryptocx.PGPDeletePublicKey
  
  
 '' See if the key was deleted ok
 ''
 If theResult = "TRUE" Then
  '' Ok, the key was deleted
 Else
  MsgBox theResult
 End If
 
 
 '' Free memory resources
 ''
 Set Cryptocx = Nothing
End Sub

Private Sub cmdDelSecretKey_Click()
 ''
 '' Delete the secret Key
 ''
 Dim theResult As String
 Dim Cryptocx As New EasyByte_Software.Cryptocxv7
 
 Cryptocx.LicenseKey = "DEMO"
 Cryptocx.KeyID = txtDelKeyID.Text
 Cryptocx.KeyFolder = txtKeyFolderDelKey.Text
 
 '' Delete the Key
 ''
 theResult = Cryptocx.PGPDeleteSecretKey
  
  
 '' See if the key was deleted ok
 ''
 If theResult = "TRUE" Then
  '' Ok, the key was deleted
 Else
  MsgBox theResult
 End If
 
 '' Free memory resources
 ''
 Set Cryptocx = Nothing
End Sub

Private Sub cmdEncryptSign_Click()
''
'' Digitally Encrypt and Sign a File
''
 Dim theResult As String
 Dim Cryptocx As New EasyByte_Software.Cryptocxv7
 
 
 Cryptocx.LicenseKey = "DEMO"

 Cryptocx.KeyFolder = txtESKeyring.Text
 Cryptocx.KeyID = txtESEncryptID.Text
 Cryptocx.SignID = txtESSignID.Text
 Cryptocx.Password = txtESPassword.Text
 Cryptocx.SourceFile = txtESSourceFile.Text
 Cryptocx.DestinationFile = txtESDestinationFile.Text

 theResult = Cryptocx.PGPEncryptSignFile
 
 
 If theResult = "TRUE" Then
  '' Alls ok, the file was encrypted and signed
 Else
  MsgBox OutPut
 End If
 

 '' Free up Memory Resources
 ''
 Set Cryptocx = Nothing
End Sub

Private Sub cmdESKeyRing_Click()
On Error Resume Next

Dim oShell As Shell
Dim oFolder As Folder
Dim oFolderItem As FolderItem
    Set oShell = New Shell
    Set oFolder = oShell.BrowseForFolder(0, "Select folder", &H1 + &H10 + &H20 + &H40 + &H8, 0)
    If IsNull(oFolder) And mCancelError Then
        Call Err.Raise(vbObjectError + 1)
    Else
        Set oFolderItem = oFolder.Items.Item
        txtESKeyring.Text = Trim(oFolderItem.Path)
        
        Set oFolderItem = Nothing
    End If
    Set oFolder = Nothing
    Set oShell = Nothing
End Sub

Private Sub cmdExtract_Click()
''
'' Extract the specified key pair from the specified key rings
''
Dim Cryptocx As New EasyByte_Software.Cryptocxv7
 

Cryptocx.LicenseKey = "DEMO"
Cryptocx.KeyFolder = txtPubKeyExtract.Text
Cryptocx.KeyID = txtKeyIDExtract.Text

 
'' Do the key extraction.
''
txtExtractedKey.Text = Cryptocx.PGPExtractKeys

End Sub

Private Sub cmdGenKeys_Click()
    ''
    '' Generate some new keys
    ''
    '' Please note that if you specify a directory that already has a
    '' key pair in it the existing keys will not be deleted or modified in any
    '' way, New Extra keys will be added to your exisiting keyring.
    Dim theResult As String
    Dim Cryptocx As New EasyByte_Software.Cryptocxv7
    
    
    '' Check that the password matches the confirmed password
    ''
    If Me.txtPGPPassword.Text = Me.txtPGPConfirmPassword.Text Then
    Else
        MsgBox "Error, the two passwords do not match each other", vbCritical + vbOKOnly
        GoTo eds
    End If
    
    '' Check that we actually have a proper password (not an empty string)
    ''
    If Trim(txtPGPPassword.Text) = "" Then
        MsgBox "Error, you must enter in a password to generate keys", vbCritical + vbOKOnly
        GoTo eds
    End If
    
    
    
    
    '' Set the properties of the Cryptocx control and then generate the keys
    ''
    Cryptocx.LicenseKey = "DEMO"
    
    Cryptocx.Password = txtPGPPassword.Text
    Cryptocx.KeyID = txtUserID.Text
    Cryptocx.KeySize = cmbKeySize.Text
    Cryptocx.KeyType = cmbKeyType.Text
    Cryptocx.KeyFolder = txtKeyFolder.Text
    
    
    '' Do the key generation. theResult will be set to any error messages if there was a problem
    '' during the key generation phase.
    ''
    theResult = Cryptocx.PGPGenKeys
    
    
    '' See if the keys were generated ok
    ''
    If theResult = "TRUE" Then
        '' Ok, the key Generation went well with no errors
    Else
        MsgBox theResult
    End If
    
eds:
End Sub

Private Sub cmdGetKeyInfo_Click()
 ''
 '' Get Information about a given key
 ''
 Dim theResult As String
 Dim Cryptocx As New EasyByte_Software.Cryptocxv7
 
 Cryptocx.LicenseKey = "DEMO"
 Cryptocx.PublicKey = txtKeyInfo.Text
 Cryptocx.WorkingFolder = "C:\"
 
 ''
 '' The info is returned in the form of a string like so:
 ''
 ''  Key Id & Chr(1) & Key type & Chr(1) & Key Size
 ''
 ''
 MsgBox Cryptocx.PGPKeyInfo
 
 '' Free memory resources
 ''
 Set Cryptocx = Nothing
End Sub

Private Sub cmdGetPublicRing_Click()
 ''
 '' Get the contents of the Public Keyring
 ''
 Dim theResult As String
 Dim Cryptocx As New EasyByte_Software.Cryptocxv7
 
 Cryptocx.LicenseKey = "DEMO"
 Cryptocx.KeyFolder = txtKeyRingContentsFolder.Text
 
 txtKeyRingContents.Text = Cryptocx.PGPGetPublicKeys
 
 
 '' Free memory resources
 ''
 Set Cryptocx = Nothing
End Sub

Private Sub cmdGetSecretRing_Click()
 ''
 '' Get the contents of the Secret Keyring
 ''
 Dim theResult As String
 Dim Cryptocx As New EasyByte_Software.Cryptocxv7
 
 Cryptocx.LicenseKey = "DEMO"
 Cryptocx.KeyFolder = txtKeyRingContentsFolder.Text
 
 txtKeyRingContents.Text = Cryptocx.PGPGetSecretKeys
 
 
 '' Free memory resources
 ''
 Set Cryptocx = Nothing
End Sub

Private Sub cmdKeyFingerprint_Click()
 ''
 '' Get the fingerprint for a Key
 ''
 Dim theResult As String
 Dim Cryptocx As New EasyByte_Software.Cryptocxv7
 
 Cryptocx.LicenseKey = "DEMO"
 Cryptocx.PublicKey = txtKeyFingerprint.Text
 Cryptocx.WorkingFolder = "C:\"
 
 '' Get and display the fingerprint for the key
 ''
 MsgBox Cryptocx.PGPGetFingerPrint
 
 '' Free memory resources
 ''
 Set Cryptocx = Nothing
End Sub

Private Sub cmdPGPDecryptFile_Click()
    ''
    '' Decrypt the specified file
    ''
    Dim theResult As String
    Dim Cryptocx As New EasyByte_Software.Cryptocxv7
    
    
    Cryptocx.LicenseKey = "DEMO"
    Cryptocx.KeyFolder = txtPGPFileSecretKeyring.Text
    Cryptocx.Password = txtPGPFilePassword.Text
    Cryptocx.SourceFile = txtPGPDecryptSourceFile.Text
    Cryptocx.DestinationFile = txtPGPDecryptDestinationFile.Text
    theResult = Cryptocx.PGPFileDecrypt
    
    '' Check to see what has happened (if the decryption went ok without errors)
    ''
    If theResult = "TRUE" Then
        '' Ok, the Decryption went well with no errors
    Else
        MsgBox theResult
    End If
    
    
    '' Free up Memory Resources
    ''
    Set Cryptocx = Nothing
End Sub

Private Sub cmdPGPEncrypt_Click()
 ''
 '' Encrypt the string
 ''
 Dim Cryptocx As New EasyByte_Software.Cryptocxv7
 
 
 Cryptocx.LicenseKey = "DEMO"
 Cryptocx.InputText = txtText2Encrypt.Text
 Cryptocx.PublicKey = txtPubKey.Text
 Cryptocx.WorkingFolder = "C:\"
 txtEncryptedText.Text = Cryptocx.PGPEncryptString
 

 '' Free up Memory Resources
 ''
 Set Cryptocx = Nothing
End Sub

Private Sub cmdPGPEncryptFile_Click()
 ''
 '' Encrypt the specified file
 ''
 Dim theResult As String
 Dim Cryptocx As New EasyByte_Software.Cryptocxv7
 
 
 Cryptocx.LicenseKey = "DEMO"
 Cryptocx.KeyFolder = txtPGPFileKeyring.Text
 Cryptocx.KeyID = txtPGPFileUserID.Text
 Cryptocx.SourceFile = txtPGPSourceFile.Text
 Cryptocx.DestinationFile = txtPGPDestinationFile.Text
 Cryptocx.AsciiArmour = "yes"
 
 theResult = Cryptocx.PGPFileEncrypt
 
 '' Check to see what has happened (if the encryption went ok without errors)
 ''
 If theResult = "TRUE" Then
  '' Ok, the Encryption went well with no errors
 Else
  MsgBox theResult
 End If


 '' Free up Memory Resources
 ''
 Set Cryptocx = Nothing
End Sub



Private Sub cmdSignFile_Click()
''
'' Digitally Sign the File
''
 Dim theResult As String
 Dim Cryptocx As New EasyByte_Software.Cryptocxv7
 
 
 Cryptocx.LicenseKey = "DEMO"

 Cryptocx.KeyFolder = txtSignKey.Text
 Cryptocx.KeyID = txtSignKeyID.Text
 Cryptocx.Password = txtSignPassword.Text

 Cryptocx.SourceFile = txtSignFile.Text
 Cryptocx.DestinationFile = txtSignDest.Text


 theResult = Cryptocx.PGPSignFile
 
 If theResult = "TRUE" Then
  '' Alls ok, the file was signed
 Else
  MsgBox OutPut
 End If
 

 '' Free up Memory Resources
 ''
 Set Cryptocx = Nothing
End Sub

Private Sub Command1_Click()
  Dim CRTF_Text As Integer
CRTF_Text = 1
On Error Resume Next

SelFileDlg.Filter = "All Files (*.*)|*.*"
SelFileDlg.FilterIndex = 0
SelFileDlg.DialogTitle = "Choose a File"
SelFileDlg.InitDir = App.Path
SelFileDlg.Flags = cdlOFNHideReadOnly
SelFileDlg.ShowOpen

 If Trim(SelFileDlg.FileName) = "" Then
 Else
  txtPGPDestinationFile.Text = Trim(SelFileDlg.FileName)
 End If

If Err = 321 Then
 If Trim(SelFileDlg.FileName) = "" Then
 Else
  txtPGPDestinationFile.Text = Trim(SelFileDlg.FileName)
 End If
ElseIf Err <> 0 Then
 GoTo Error_Open
End If

Exit Sub
Error_Open:
 MsgBox$ ("An error has occured. Error " & Err & " " & Error)
Exit Sub
End Sub

Private Sub Command11_Click()
On Error Resume Next

Dim oShell As Shell
Dim oFolder As Folder
Dim oFolderItem As FolderItem
    Set oShell = New Shell
    Set oFolder = oShell.BrowseForFolder(0, "Select folder", &H1 + &H10 + &H20 + &H40 + &H8, 0)
    If IsNull(oFolder) And mCancelError Then
        Call Err.Raise(vbObjectError + 1)
    Else
        Set oFolderItem = oFolder.Items.Item
        txtSignKey.Text = Trim(oFolderItem.Path)
        
        Set oFolderItem = Nothing
    End If
    Set oFolder = Nothing
    Set oShell = Nothing
End Sub

Private Sub Command12_Click()
  Dim CRTF_Text As Integer
CRTF_Text = 1
On Error Resume Next

SelFileDlg.Filter = "All Files (*.*)|*.*"
SelFileDlg.FilterIndex = 0
SelFileDlg.DialogTitle = "Choose a File"
SelFileDlg.InitDir = App.Path
SelFileDlg.Flags = cdlOFNHideReadOnly
SelFileDlg.ShowOpen

 If Trim(SelFileDlg.FileName) = "" Then
 Else
  txtSignFile.Text = Trim(SelFileDlg.FileName)
 End If

If Err = 321 Then
 If Trim(SelFileDlg.FileName) = "" Then
 Else
  txtSignFile.Text = Trim(SelFileDlg.FileName)
 End If
ElseIf Err <> 0 Then
 GoTo Error_Open
End If

Exit Sub
Error_Open:
 MsgBox$ ("An error has occured. Error " & Err & " " & Error)
Exit Sub
End Sub

Private Sub Command15_Click()
On Error Resume Next

Dim oShell As Shell
Dim oFolder As Folder
Dim oFolderItem As FolderItem
    Set oShell = New Shell
    Set oFolder = oShell.BrowseForFolder(0, "Select folder", &H1 + &H10 + &H20 + &H40 + &H8, 0)
    If IsNull(oFolder) And mCancelError Then
        Call Err.Raise(vbObjectError + 1)
    Else
        Set oFolderItem = oFolder.Items.Item
        txtAddKey.Text = Trim(oFolderItem.Path)
        
        Set oFolderItem = Nothing
    End If
    Set oFolder = Nothing
    Set oShell = Nothing
End Sub

Private Sub Command16_Click()
On Error Resume Next

Dim oShell As Shell
Dim oFolder As Folder
Dim oFolderItem As FolderItem
    Set oShell = New Shell
    Set oFolder = oShell.BrowseForFolder(0, "Select folder", &H1 + &H10 + &H20 + &H40 + &H8, 0)
    If IsNull(oFolder) And mCancelError Then
        Call Err.Raise(vbObjectError + 1)
    Else
        Set oFolderItem = oFolder.Items.Item
        txtPGPFileKeyring.Text = Trim(oFolderItem.Path)
        
        Set oFolderItem = Nothing
    End If
    Set oFolder = Nothing
    Set oShell = Nothing
End Sub

Private Sub Command17_Click()
On Error Resume Next

Dim oShell As Shell
Dim oFolder As Folder
Dim oFolderItem As FolderItem
    Set oShell = New Shell
    Set oFolder = oShell.BrowseForFolder(0, "Select folder", &H1 + &H10 + &H20 + &H40 + &H8, 0)
    If IsNull(oFolder) And mCancelError Then
        Call Err.Raise(vbObjectError + 1)
    Else
        Set oFolderItem = oFolder.Items.Item
        txtPGPFileSecretKeyring.Text = Trim(oFolderItem.Path)
        
        Set oFolderItem = Nothing
    End If
    Set oFolder = Nothing
    Set oShell = Nothing
End Sub

Private Sub Command18_Click()
  Dim CRTF_Text As Integer
CRTF_Text = 1
On Error Resume Next

SelFileDlg.Filter = "All Files (*.*)|*.*"
SelFileDlg.FilterIndex = 0
SelFileDlg.DialogTitle = "Choose a File"
SelFileDlg.InitDir = App.Path
SelFileDlg.Flags = cdlOFNHideReadOnly
SelFileDlg.ShowOpen

 If Trim(SelFileDlg.FileName) = "" Then
 Else
  txtSignDest.Text = Trim(SelFileDlg.FileName)
 End If

If Err = 321 Then
 If Trim(SelFileDlg.FileName) = "" Then
 Else
  txtSignDest.Text = Trim(SelFileDlg.FileName)
 End If
ElseIf Err <> 0 Then
 GoTo Error_Open
End If

Exit Sub
Error_Open:
 MsgBox$ ("An error has occured. Error " & Err & " " & Error)
Exit Sub
End Sub

Private Sub Command22_Click()
On Error Resume Next

Dim oShell As Shell
Dim oFolder As Folder
Dim oFolderItem As FolderItem
    Set oShell = New Shell
    Set oFolder = oShell.BrowseForFolder(0, "Select folder", &H1 + &H10 + &H20 + &H40 + &H8, 0)
    If IsNull(oFolder) And mCancelError Then
        Call Err.Raise(vbObjectError + 1)
    Else
        Set oFolderItem = oFolder.Items.Item
        txtKeyRingContentsFolder.Text = Trim(oFolderItem.Path)
        
        Set oFolderItem = Nothing
    End If
    Set oFolder = Nothing
    Set oShell = Nothing
End Sub

Private Sub Command23_Click()
  Dim CRTF_Text As Integer
CRTF_Text = 1
On Error Resume Next

SelFileDlg.Filter = "All Files (*.*)|*.*"
SelFileDlg.FilterIndex = 0
SelFileDlg.DialogTitle = "Choose a File"
SelFileDlg.InitDir = App.Path
SelFileDlg.Flags = cdlOFNHideReadOnly
SelFileDlg.ShowOpen

 If Trim(SelFileDlg.FileName) = "" Then
 Else
  txtESDestinationFile.Text = Trim(SelFileDlg.FileName)
 End If

If Err = 321 Then
 If Trim(SelFileDlg.FileName) = "" Then
 Else
  txtESDestinationFile.Text = Trim(SelFileDlg.FileName)
 End If
ElseIf Err <> 0 Then
 GoTo Error_Open
End If

Exit Sub
Error_Open:
 MsgBox$ ("An error has occured. Error " & Err & " " & Error)
Exit Sub
End Sub

Private Sub Command24_Click()
  Dim CRTF_Text As Integer
CRTF_Text = 1
On Error Resume Next

SelFileDlg.Filter = "All Files (*.*)|*.*"
SelFileDlg.FilterIndex = 0
SelFileDlg.DialogTitle = "Choose a File"
SelFileDlg.InitDir = App.Path
SelFileDlg.Flags = cdlOFNHideReadOnly
SelFileDlg.ShowOpen

 If Trim(SelFileDlg.FileName) = "" Then
 Else
  txtESSourceFile.Text = Trim(SelFileDlg.FileName)
 End If

If Err = 321 Then
 If Trim(SelFileDlg.FileName) = "" Then
 Else
  txtESSourceFile.Text = Trim(SelFileDlg.FileName)
 End If
ElseIf Err <> 0 Then
 GoTo Error_Open
End If

Exit Sub
Error_Open:
 MsgBox$ ("An error has occured. Error " & Err & " " & Error)
Exit Sub
End Sub

Private Sub Command3_Click()
On Error Resume Next

Dim oShell As Shell
Dim oFolder As Folder
Dim oFolderItem As FolderItem
    Set oShell = New Shell
    Set oFolder = oShell.BrowseForFolder(0, "Select folder", &H1 + &H10 + &H20 + &H40 + &H8, 0)
    If IsNull(oFolder) And mCancelError Then
        Call Err.Raise(vbObjectError + 1)
    Else
        Set oFolderItem = oFolder.Items.Item
        txtKeyFolderDelKey.Text = Trim(oFolderItem.Path)
        
        Set oFolderItem = Nothing
    End If
    Set oFolder = Nothing
    Set oShell = Nothing
End Sub

Private Sub Command4_Click()
  Dim CRTF_Text As Integer
CRTF_Text = 1
On Error Resume Next

SelFileDlg.Filter = "All Files (*.*)|*.*"
SelFileDlg.FilterIndex = 0
SelFileDlg.DialogTitle = "Choose a File"
SelFileDlg.InitDir = App.Path
SelFileDlg.Flags = cdlOFNHideReadOnly
SelFileDlg.ShowOpen

 If Trim(SelFileDlg.FileName) = "" Then
 Else
  txtPGPSourceFile.Text = Trim(SelFileDlg.FileName)
 End If

If Err = 321 Then
 If Trim(SelFileDlg.FileName) = "" Then
 Else
  txtPGPSourceFile.Text = Trim(SelFileDlg.FileName)
 End If
ElseIf Err <> 0 Then
 GoTo Error_Open
End If

Exit Sub
Error_Open:
 MsgBox$ ("An error has occured. Error " & Err & " " & Error)
Exit Sub

End Sub

Private Sub Command8_Click()
  Dim CRTF_Text As Integer
CRTF_Text = 1
On Error Resume Next

SelFileDlg.Filter = "All Files (*.*)|*.*"
SelFileDlg.FilterIndex = 0
SelFileDlg.DialogTitle = "Choose a File"
SelFileDlg.InitDir = App.Path
SelFileDlg.Flags = cdlOFNHideReadOnly
SelFileDlg.ShowOpen

 If Trim(SelFileDlg.FileName) = "" Then
 Else
  txtPGPDecryptSourceFile.Text = Trim(SelFileDlg.FileName)
 End If

If Err = 321 Then
 If Trim(SelFileDlg.FileName) = "" Then
 Else
  txtPGPDecryptSourceFile.Text = Trim(SelFileDlg.FileName)
 End If
ElseIf Err <> 0 Then
 GoTo Error_Open
End If

Exit Sub
Error_Open:
 MsgBox$ ("An error has occured. Error " & Err & " " & Error)
Exit Sub
End Sub

Private Sub Form_Load()
 cmbKeySize.Clear
 cmbKeySize.AddItem "512"
 cmbKeySize.AddItem "1024"
 cmbKeySize.AddItem "2048"
 cmbKeySize.AddItem "4096"
 cmbKeySize.ListIndex = 0

 cmbKeyType.Clear
 cmbKeyType.AddItem "RSA"
 cmbKeyType.AddItem "DH/DSS"
 cmbKeyType.ListIndex = 0
End Sub

Private Sub txtPGPDecrypt_Click()
''
'' Encrypt the string
''
 Dim Cryptocx As New EasyByte_Software.Cryptocxv7
  
 Cryptocx.LicenseKey = "DEMO"

 Cryptocx.KeyFolder = txtPGPSecRing.Text
 Cryptocx.Password = txtPGPDecryptPassword.Text
 Cryptocx.InputText = txtPGPText.Text
 txtDecryptedPGPText.Text = Cryptocx.PGPDecryptString
 

 '' Free up Memory Resources
 ''
 Set Cryptocx = Nothing
End Sub
